package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import edu.calvin.cs214.hobbes2008.HobbesTIR;
import edu.calvin.cs214.hobbes2008.StringTIR;
import edu.calvin.cs214.hobbes2008.TupleTIR;
import edu.calvin.djs32.cs214.interpreters.calculator.Primitive;

public class LessThanOrEqualsToPrimitive implements Primitive{
	public GreaterThanPrimitive gtPrim = new GreaterThanPrimitive();

	public HobbesTIR apply(HobbesTIR... tir) {
		if (gtPrim.apply(tir[0], tir[1]).equals(new TupleTIR())){
			return new StringTIR("true");
		}else{
			return new TupleTIR();
		}
	}
}
